package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingSportRecordMapper;
import com.ruoyi.ring.domain.RingSportRecord;
import com.ruoyi.ring.service.IRingSportRecordService;

/**
 * 运动Service业务层处理
 * 
 * @author liuwp
 * @date 2025-08-07
 */
@Service
public class RingSportRecordServiceImpl implements IRingSportRecordService 
{
    @Autowired
    private RingSportRecordMapper ringSportRecordMapper;

    /**
     * 查询运动
     * 
     * @param id 运动主键
     * @return 运动
     */
    @Override
    public RingSportRecord selectRingSportRecordById(Long id)
    {
        return ringSportRecordMapper.selectRingSportRecordById(id);
    }

    /**
     * 查询运动列表
     * 
     * @param ringSportRecord 运动
     * @return 运动
     */
    @Override
    public List<RingSportRecord> selectRingSportRecordList(RingSportRecord ringSportRecord)
    {
        return ringSportRecordMapper.selectRingSportRecordList(ringSportRecord);
    }

    /**
     * 根据业务主键查询一条记录：运动
     *
     * @param ringSportRecord 运动
     * @return 运动
     */
    @Override
    public RingSportRecord selectOneRingSportRecord(RingSportRecord ringSportRecord)
    {
        return ringSportRecordMapper.selectOneRingSportRecord(ringSportRecord);
    }

    /**
     * 新增运动
     * 
     * @param ringSportRecord 运动
     * @return 结果
     */
    @Override
    public int insertRingSportRecord(RingSportRecord ringSportRecord)
    {
        ringSportRecord.setCreateTime(DateUtils.getNowDate());
        return ringSportRecordMapper.insertRingSportRecord(ringSportRecord);
    }

    /**
     * 修改运动
     * 
     * @param ringSportRecord 运动
     * @return 结果
     */
    @Override
    public int updateRingSportRecord(RingSportRecord ringSportRecord)
    {
        return ringSportRecordMapper.updateRingSportRecord(ringSportRecord);
    }

    @Override
    public int updateRingSportRecordCondition(RingSportRecord ringSportRecord, RingSportRecord ringSportRecordCondition)
    {
        return ringSportRecordMapper.updateRingSportRecordCondition(ringSportRecord, ringSportRecordCondition);
    }

    /**
     * 批量删除运动
     * 
     * @param ids 需要删除的运动主键
     * @return 结果
     */
    @Override
    public int deleteRingSportRecordByIds(Long[] ids)
    {
        return ringSportRecordMapper.deleteRingSportRecordByIds(ids);
    }

    /**
     * 删除运动信息
     * 
     * @param id 运动主键
     * @return 结果
     */
    @Override
    public int deleteRingSportRecordById(Long id)
    {
        return ringSportRecordMapper.deleteRingSportRecordById(id);
    }

    /**
     * 条件删除运动
     *
     * @param ringSportRecord 运动
     * @return 结果
     */
    @Override
    public int deleteRingSportRecordByCondition(RingSportRecord ringSportRecord)
    {
        return ringSportRecordMapper.deleteRingSportRecordByCondition(ringSportRecord);
    }

}
